<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="__URL__" method="post">

        <input type="hidden" name="pageSize" value="{$numPerPage}">
        <input type="hidden" name="pageCurrent" value="{$_REQUEST['pageNum']|default=1}">

        <div class="bjui-searchBar">
            <label>关键词：</label><input type="text" value="{$_REQUEST['keys']}" name="keys" class="form-control"
                                      size="15"/>
            <label>部门:</label>
            <select name="depname" data-toggle="selectpicker">
                <option value="">全部</option>
                <foreach name="dlist" item="v">
                    <option value="{$v.depname}"
                    <if condition="$v.depname EQ $_REQUEST['depname'] ">selected
                        <else/>
                        {$_REQUEST['depname']}
                    </if>
                    >{$v.depname}</option>
                </foreach>
            </select>&nbsp;
            <label>职位:</label>
            <select name="posname" data-toggle="selectpicker">
                <option value="">全部</option>
                <foreach name="plist" item="v">
                    <option value="{$v.posname}"
                    <if condition="$v.posname EQ $_REQUEST['posname'] ">selected
                        <else/>
                        {$_REQUEST['posname']}
                    </if>
                    >{$v.posname}</option>
                </foreach>
            </select>&nbsp;
            <button type="submit" class="btn-default" data-icon="search">查询</button>
            <a class="btn btn-orange" href="javascript:;" onclick="$(this).navtab('reloadForm', true);"
               data-icon="undo">清空查询</a>
            <php>if(display(CONTROLLER_NAME.'/del')){</php>
            <span style="float:right;"><a href="__URL__/del/navTabId/{:CONTROLLER_NAME}" class="btn btn-red"
                                          data-toggle="doajax" data-confirm-msg="确定要清理吗？"
                                          data-icon="remove">清理</a></span>
            <php>}</php>
            <php>if(display(CONTROLLER_NAME.'/add')){</php>
            <span style="float:right;margin-right:5px;"><a href="__URL__/add/navTabId/{:CONTROLLER_NAME}"
                                                           class="btn btn-green" data-toggle="dialog" data-width="600"
                                                           data-height="450" data-id="dialog-mask" data-mask="true"
                                                           data-icon="plus">新增</a></span>
            <php>}</php>
        </div>
    </form>

</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed" data-width="100%" data-layout-h="0" data-nowrap="true">
        <thead>
        <tr>
            <th width="30" height="30"></th>
            <th>编号</th>
            <th>登陆账号</th>
            <th>真实姓名</th>
            <th>所在部门</th>
            <th>担任职位</th>
            <th>固定电话</th>
            <th>移动电话</th>
            <th>电子邮箱</th>
            <th>QQ</th>
            <php>if(display(CONTROLLER_NAME.'/editrule')){</php>
            <th>权限</th>
            <php>}</php>
            <th data-order-direction="desc" data-order-field="logintime">登陆时间</th>
            <th>登陆IP</th>
            <th data-order-direction="desc" data-order-field="logins">登陆次数</th>
            <php>if(display(CONTROLLER_NAME.'/lock')){</php>
            <th>状态</th>
            <php>}</php>
            <php>if(display(CONTROLLER_NAME.'/edit')){</php>
            <th>编辑</th>
            <php>}</php>
        </tr>
        </thead>
        <tbody>

        <volist id="v" name="list">
            <tr>
                <td></td>
                <td>{$v.id}</td>
                <td>{$v.username}</td>
                <td>{$v.truename}</td>
                <td>{$v.depname}</td>
                <td>{$v.posname}</td>
                <td>{$v.tel}</td>
                <td>{$v.phone}</td>
                <td>{$v.email}</td>
                <td>{$v.qq}</td>
                <php>if(display(CONTROLLER_NAME.'/editrule')){</php>
                <td>
                    <a href="{:U('editrule',array('id'=>$v['id'],depname=>$v['depname'],'posname'=>$v['posname'],'navTabId'=>CONTROLLER_NAME))}"
                       data-toggle="doajax" data-confirm-msg="确定要操作吗？">
                        <php>M('auth_group_access')->where(array("group_id"=>0))->delete();if
                            (M('auth_group_access')->where(array("uid"=>$v['id']))->count() > 0){echo "有";}else{echo
                            "无";}
                        </php>
                    </a></td>
                <php>}</php>
                <td>{$v.logintime}</td>
                <td>{$v.loginip}</td>
                <td>{$v.logins}</td>
                <php>if(display(CONTROLLER_NAME.'/lock')){</php>
                <td><a href="__URL__/lock/id/{$v['id']}/navTabId/{:CONTROLLER_NAME}" data-toggle="doajax"
                       data-confirm-msg="确定要操作吗？">
                    <if condition="$v.status EQ 1 "><img src="__PUBLIC__/images/ok.gif" border="0"/>
                        <else/>
                        <img src="__PUBLIC__/images/locked.gif" border="0"/></if>
                </a></td>
                <php>}</php>
                <php>if(display(CONTROLLER_NAME.'/edit')){</php>
                <td><a href="__URL__/edit/id/{$v['id']}/navTabId/{:CONTROLLER_NAME}" class="btn btn-green btn-sm"
                       data-toggle="dialog" data-width="600" data-height="450" data-id="dialog-mask"
                       data-mask="true">编辑</a></td>
                <php>}</php>
            </tr>
        </volist>
        </tbody>
    </table>
</div>
<div class="bjui-pageFooter">
    <div class="pages">
        <span>共 {$totalCount} 条  每页 {$numPerPage} 条</span>
    </div>
    <div class="pagination-box" data-toggle="pagination" data-total="{$totalCount}" data-page-size="{$numPerPage}"
         data-page-current="{$currentPage}">
    </div>
</div>